﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
// K.I.S.S. - Keep It Stupid Simple
// Конечный автомат - читать
namespace Homework_Lection_2_task1
{
    public class Test
    {
        public class Victor
        {
            public const string Name = "Victor";
            public int Age;
        }

        public string Field1;
        public string Property { get; set; }

        public enum TestEnum
        {
            One,
            Two,
        }

        public void ExpressionLesson()
        {
            // 1) Array
            // <type>[] varname = new <type>[length];
            // - READ ONLY
            // - INDEX SEARCH = O(1)
            // - Object Search = O(N)
            int[] point = new int[2];
            point[0] = 1;
            point[1] = 2;
                                  // Big O Notation - читать
            // 2) List
            // READ-WRITE
            // Append - O(1)
            // Insert - O(N)
            // Remove - O(N)
            // Index Search = O(1)
            // Object Search = O(N)

            List<int> intList = new List<int>();
            intList.Add(42);
            intList.Add(654);
            intList.Add(9889);
            intList.Remove(42);

            // 3) Dictionary
            // Dictionary<key_type, value_type> variable = new Dictionary<key_type, value_type>();
            // variable[key] = value;
            // value = variable[key];
            // GET - O(1);
            // ADD - 0(1); count < capacity; O(N)
            Dictionary<string, Victor> dictionary = new Dictionary<string, Victor>();
            dictionary["Victor"] = new Victor();
            dictionary["Andrey"] = new Victor();
            dictionary.Add("Alexander", new Victor());

            var andreyVictor = dictionary["Andrey"];



            foreach (int item in point)
            {
                //item
            }
            

            //var variable = TestEnum.One;

            ///* L-Value = R-Value */
            ///* read-write expression */
            //Property = Field1 = "hello" + ("hello" + "456").ToUpper(); /* read only expression*/;

            ////var b = false || true || false || false || false;

            //0 or 0 = 0;
            //0 or 1 = 1;
            //1 or 0 = 1;
            //1 or 1 = 1;
            
            //Victor victorVariable = new Victor() { Age = 12 };
            //// R - return, L - get

            //var victorVariable2 = new Victor() { Age = 12 };

            ////
            //var rr = victorVariable.Age * 57425235;
            //int r2 = victorVariable.Age = 574;

            //int i = 5;
            ///*
            //i = 5 - 2
            //i = 3 - 2
            //i = 1 - 2
            //i = 1 - 2
            //i = -3 - 1
            // */
            //while (i != 0)
            //{
            //    i = i - 2;
            //    if (i < 0)
            //    {
            //        break;
            //    }
            //}

            ///* for (initialization expression; execution condition; iteration expression)  */

            //for (;;)
            //{

            //}

            //for (int j = 0; j < 5;j--)
            //{
            //    // Integer overflow - wow
            //}
        }
    }
}
